import random

# 进入第二轮的12个队伍
teams = [11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22]
random.shuffle(teams)

# 机制轮盘
pattern = [[1, 2, 3, 4], [4, 3, 2, 1], [5, 6, 7, 8],
           [8, 7, 6, 5], [9, 10, 11, 12], [12, 11, 10, 9]]

# 替换轮盘中的值为队伍编号
for i in range(len(pattern)):
    for j in range(len(pattern[0])):
        pattern[i][j] = teams[pattern[i][j] - 1]
    print(str(pattern[i][0])+","+str(pattern[i][1]) +
          ","+str(pattern[i][2])+","+str(pattern[i][3]))
